package com.tjc.cloud.util.json.ext

import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.databind.ObjectMapper
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class AutoConfiguration {
    @Bean
    @ConditionalOnClass(ObjectMapper::class)
    fun objectMapper(jacksonObjectMapper:ObjectMapper): ObjectMapper {
        jacksonObjectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY)
//        jacksonObjectMapper.registerModule(JTSM)
        return jacksonObjectMapper
    }


}